#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>

int main() {
    int fd = open("/dev/deadlock_dev", O_RDWR); // 触发open函数中的死锁[2](@ref)
    if (fd < 0) {
        perror("Open failed");
        return -1;
    }
    printf("Opened device (will hang here)\n");
    close(fd);
    return 0;
}   